<template>
  <RouterLink :to="/profile/+'?'+user.username">
    <div class="avatar_and_username">
      <Avatar v-bind:head_url=user.head_url>
      </Avatar>
      <p>{{ user.username }}</p>
    </div>
  </RouterLink>

</template>

<script>
import Avatar from "@/components/common/Avatar";

export default {
  name: "UserInfo",
  data() {
    return {}
  },
  props: {
    user: {
      type: Object,
      default() {
        return {}
      }
    },
    username: {
      type: String,
    }
  },
  components: {Avatar},
  methods: {}
}
</script>

<style scoped>
.avatar_and_username {
  padding-left: 20px;
  display: flex;
  align-items: center;
}
</style>